package com.ruoyi.erp.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.erp.mapper.ErpWeeklyRecordMapper;
import com.ruoyi.erp.domain.ErpWeeklyRecord;
import com.ruoyi.erp.service.IErpWeeklyRecordService;

/**
 * 周报分享人列表Service业务层处理
 *
 * @author ruoyi
 * @date 2024-10-14
 */
@Service
public class ErpWeeklyRecordServiceImpl extends ServiceImpl<ErpWeeklyRecordMapper, ErpWeeklyRecord> implements IErpWeeklyRecordService
{
    @Autowired
    private ErpWeeklyRecordMapper erpWeeklyRecordMapper;

    /**
     * 查询周报分享人列表
     *
     * @param userId 周报分享人列表主键
     * @return 周报分享人列表
     */
    @Override
    public ErpWeeklyRecord selectErpWeeklyRecordByUserId(String userId)
    {
        return erpWeeklyRecordMapper.selectErpWeeklyRecordByUserId(userId);
    }

    /**
     * 查询周报分享人列表列表
     *
     * @param erpWeeklyRecord 周报分享人列表
     * @return 周报分享人列表
     */
    @Override
    public List<ErpWeeklyRecord> selectErpWeeklyRecordList(ErpWeeklyRecord erpWeeklyRecord)
    {
        return erpWeeklyRecordMapper.selectErpWeeklyRecordList(erpWeeklyRecord);
    }

    /**
     * 新增周报分享人列表
     *
     * @param erpWeeklyRecord 周报分享人列表
     * @return 结果
     */
    @Override
    public int insertErpWeeklyRecord(ErpWeeklyRecord erpWeeklyRecord)
    {
        return erpWeeklyRecordMapper.insertErpWeeklyRecord(erpWeeklyRecord);
    }

    /**
     * 修改周报分享人列表
     *
     * @param erpWeeklyRecord 周报分享人列表
     * @return 结果
     */
    @Override
    public int updateErpWeeklyRecord(ErpWeeklyRecord erpWeeklyRecord)
    {
        return erpWeeklyRecordMapper.updateErpWeeklyRecord(erpWeeklyRecord);
    }

    /**
     * 批量删除周报分享人列表
     *
     * @param userIds 需要删除的周报分享人列表主键
     * @return 结果
     */
    @Override
    public int deleteErpWeeklyRecordByUserIds(String[] userIds)
    {
        return erpWeeklyRecordMapper.deleteErpWeeklyRecordByUserIds(userIds);
    }

    /**
     * 删除周报分享人列表信息
     *
     * @param userId 周报分享人列表主键
     * @return 结果
     */
    @Override
    public int deleteErpWeeklyRecordByUserId(String userId)
    {
        return erpWeeklyRecordMapper.deleteErpWeeklyRecordByUserId(userId);
    }

    /**
     * 获取分享人列表
     * @param erpWeeklyRecord
     * @return
     */
    @Override
    public List<ErpWeeklyRecord> getErpWeeklyRecordList(ErpWeeklyRecord erpWeeklyRecord) {
        return erpWeeklyRecordMapper.getErpWeeklyRecordList(erpWeeklyRecord);
    }
}
